object ConstructorDemo01 {
  def main(args:Array[String]):Unit = {
    val person = new PersonA("tom")
    println(person)

    val a1 = new A
    val a2 = new A()
  }

}
class PersonA(inName :String, inAge :Int){
  var name :String = inName
  var age : Int = inAge
  age += 10
  println("age=" + age)

  def this(name: String){
    this("jack",10)
    println("--------------------------------------------")
    this.name = name

  }
  override def toString:String = {
    "name=" + this.name + "\t age" + this.age
  }
}
class A(){

}